import axios from '@/request/http'
import { commonOutDTO } from '@/api/common.d'
import { SaveScannerInputDTO } from './scan-dto'
export default class scanService {
  /**
   * 获取扫描仪列表
   */
  static queryScanList(): Promise<commonOutDTO<string[]>> {
    return axios.post(`${window.SCANIP}/spi/scanner/queryScanner`)
  }
  /**
   * 保存扫描仪配置
   */
  static saveScanner(data: SaveScannerInputDTO): Promise<commonOutDTO<any>> {
    return axios.post(`${window.SCANIP}/spi/scanner/saveScannerProperties`, data)
  }
  /**
   * 打开扫描仪属性设置窗口
   */
  static openSettings(data: SaveScannerInputDTO): Promise<commonOutDTO<any>> {
    return axios.post(`${window.SCANIP}/spi/scanner/openSettings`, data)
  }
}
